package com.loongtech.bi.manager.realTime;

import com.loongtech.bi.action.PageHelper;
import com.loongtech.bi.manager.system.ConfigManager;
import com.loongtech.bi.support.chart.ChartData1;
import com.loongtech.bi.support.chart.ChartFlow;
import com.loongtech.bi.support.chart.ChartSelect;
import com.loongtech.core.jpa.manager.ManagerQueryCacheBase;
import com.loongtech.core.util.Time;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;
import java.util.regex.Pattern;

/**
 * 实时数据-实时概况manager
 * 
 * @author marin
 * @date 2015-09-15
 */
@Service
public class OverviewManager extends ManagerQueryCacheBase<Object> {
	private static final long serialVersionUID = 1L;

	@Autowired
	NewUserByDayManager newUserByDayManager;
	@Autowired
	DistinctNewUserByDayManager distinctNewUserByDayManager;
	@Autowired
	NewUserByHourManager newUserByHourManager;
	@Autowired
	DistinctNewUserByHourManager distinctNewUserByHourManager;
	@Autowired
	ActiveDeviceByDayManager activeDeviceByDayManager;
	@Autowired
	NewDeviceByDayManager newDeviceByDayManager;
	@Autowired
	DauByDayManager dauByDayManager;
	@Autowired
	DauByHourManager dauByHourManager;

	@Autowired
	AddCashUserByHourManager addCashUserByHourManager;

	@Autowired
	AddCashUserByDayManager addCashUserByDayManager;

	@Autowired
	CashAddByDayManager cashAddByDayManager;
	@Autowired
	CashAddByHourManager cashAddByHourManager;
	@Autowired
	NewUserAddCashUserByHourManager newUserAddCashUserByHourManager;
	@Autowired
	NewUserCashAddByHourManager newUserCashAddByHourManager;

	@Autowired
	UserSecondLeftByDayManager userSecondLeftByDayManager;

	@Autowired
	UserThirdLeftByDayManager userThirdLeftByDayManager;

    @Autowired
    UserSevenLeftByDayManager userSevenLeftByDayManager;

	@Autowired
	NewUserActiveByHourManager user2LeftByHourManager;
	
	@Autowired
	DauTotalByHourManager dauTotalByHourManager;

	@Autowired
	private ConfigManager configManager;

	public String getMoneyType() {
		return configManager.getConfigValueByName(ConfigManager.MONEY_TYPE) == null ? "($)" : configManager
				.getConfigValueByName(ConfigManager.MONEY_TYPE);
	}

	// 得到今日实时汇总数据
	public List<OverviewData> getOverviewData(Date lookDate, String queryPlatform, String queryChannel, String queryServer) {
		List<OverviewData> result = new ArrayList<>();
		// 激活设备数
		OverviewData o0 = new OverviewData();
		o0.setTitle("激活设备");
		// 新增设备数
		OverviewData o01 = new OverviewData();
		o01.setTitle("新增设备");
		// 激活新增转换率
		OverviewData o02 = new OverviewData();
		o02.setTitle("激活新增转换率");
		// 新增账号数
		OverviewData o1 = new OverviewData();
		o1.setTitle("新增账号");
		// 去重新增账号数
		OverviewData o100 = new OverviewData();
		o100.setTitle("去重新增账号");
		// 活跃账号数
		OverviewData o2 = new OverviewData();
		o2.setTitle("活跃账号");
		// 付费账号数
		OverviewData o3 = new OverviewData();
		o3.setTitle("付费账号");
		// 付费金额=
		OverviewData o4 = new OverviewData();
		o4.setTitle("付费金额" + getMoneyType());
		// 活跃付费渗透率
		OverviewData o5 = new OverviewData();
		o5.setTitle("活跃付费率");
		// 付费ARPU
		OverviewData o6 = new OverviewData();
		o6.setTitle("付费ARPU" + getMoneyType());
		// 昨日新增帐号次日留存率
		OverviewData o7 = new OverviewData();
		o7.setTitle(Time.getDateByNum(lookDate,-1) + ":次留(设备／账号)");
		OverviewData o8 = new OverviewData();
		o8.setTitle(Time.getDateByNum(lookDate,-2) + ":三留(设备／账号)");
		OverviewData o9 = new OverviewData();
		o9.setTitle("活跃ARPU" + getMoneyType());
        OverviewData o10 = new OverviewData();
        o10.setTitle(Time.getDateByNum(lookDate,-6) + ":七留(设备／账号)");

		OverviewData o12 = new OverviewData();
		o12.setTitle("本月累计付费金额" + getMoneyType());
		o12.setValue(cashAddByDayManager.getAllMonthCashAddByConditions(lookDate, queryPlatform, queryChannel, queryServer));

		OverviewData o13 = new OverviewData();
		o13.setTitle("本月累计新增帐号");
		o13.setValue(newUserByDayManager.getAllMonthNewUserByConditions(lookDate, queryPlatform, queryChannel, queryServer));
		
		o0.setValue(activeDeviceByDayManager.getAllActiveDeviceByConditions(lookDate, queryPlatform, queryChannel,queryServer));
		o01.setValue(newDeviceByDayManager.getAllNewDeviceByConditions(lookDate, queryPlatform, queryChannel,queryServer));

		String livenum = activeDeviceByDayManager.getAllLiveDeviceByConditions(lookDate, queryPlatform, queryChannel, queryServer);

		o1.setValue(newUserByDayManager.getAllNewUserByConditions(lookDate, queryPlatform, queryChannel, queryServer));
		o100.setValue(distinctNewUserByDayManager.getAllDistinctNewUserByConditions(lookDate, queryPlatform,
				queryChannel, queryServer));
		o2.setValue(dauByDayManager.getAllActiveUserByConditions(lookDate, queryPlatform, queryChannel, queryServer));
		o3.setValue(addCashUserByDayManager.getAllPayUserByConditions(lookDate, queryPlatform, queryChannel,
				queryServer));
		o4.setValue(cashAddByDayManager.getAllCashAddByConditions(lookDate, queryPlatform, queryChannel, queryServer));
		o7.setValue(userSecondLeftByDayManager.getAllMacSecondLeftByConditions(lookDate, queryPlatform, queryChannel,
                queryServer) + "／" + userSecondLeftByDayManager.getAllUserSecondLeftByConditions(lookDate, queryPlatform, queryChannel,
				queryServer));
		o8.setValue(userThirdLeftByDayManager.getAllMacThirdLeftByConditions(lookDate, queryPlatform, queryChannel,
                queryServer)+"／"+ userThirdLeftByDayManager.getAllUserThirdLeftByConditions(lookDate, queryPlatform, queryChannel,
				queryServer));

		o10.setValue(userSevenLeftByDayManager.getAllMacSevenLeftByConditions(lookDate, queryPlatform, queryChannel,
                queryServer)+"／"+ userSevenLeftByDayManager.getAllUserSevenLeftByConditions(lookDate, queryPlatform, queryChannel,
                queryServer));

		if (!"-".equals(o3.getValue()) && !"-".equals(o2.getValue()) && !"0".equals(o2.getValue())) {
			o5.setValue(PageHelper.double2Percent(Integer.parseInt(o3.getFormatValue()) * 1.0
					/ Integer.parseInt(o2.getFormatValue())));
		}

		if (!"-".equals(o3.getValue()) && !"-".equals(o4.getValue()) && !"0".equals(o3.getValue())) {
			o6.setValue(PageHelper.floatKeepTwoNumber((float) (Integer.parseInt(o4.getFormatValue()) * 1.0 / Integer
					.parseInt(o3.getFormatValue()))) + "");
		}

		if (!"-".equals(o2.getValue()) && !"-".equals(o4.getValue()) && !"0".equals(o2.getValue())) {
			o9.setValue(PageHelper.floatKeepTwoNumber((float) (Integer.parseInt(o4.getFormatValue()) * 1.0 / Integer
					.parseInt(o2.getFormatValue()))) + "");
		}

		if (!"-".equals(o0.getValue()) && !"-".equals(o01.getValue()) && !"0".equals(o0.getValue())) {
            o02.setValue(PageHelper.double2Percent((Integer.parseInt(o01.getFormatValue()) * 1.0 / Integer.parseInt(o0
                    .getFormatValue()))));

			/*if ("0".equals(livenum)) {
				o02.setValue(PageHelper.double2Percent((Integer.parseInt(o01.getFormatValue()) * 1.0 / Integer.parseInt(o0
						.getFormatValue()))));
			} else {
				o02.setValue(PageHelper.double2Percent((Integer.parseInt(livenum) * 1.0 / Integer.parseInt(o0
						.getFormatValue()))));
			}*/
		}

		result.add(o0);
		result.add(o01);
		result.add(o02);
		result.add(o1);
		// result.add(o100);
		result.add(o2);
		// result.add(o3);
		result.add(o4);
		result.add(o5);
		result.add(o9);
		result.add(o6);
		result.add(o7);
		result.add(o8);
		result.add(o10);
		result.add(o12);
		result.add(o13);

		return result;
	}

	// 得到今日分时和累计实时详细数据：updateType=1-分时;updateType=2-累计
	public List<OverviewDetailData> getOverviewDetailData(String updateType, Date lookDate, Date compareDate,
			Date lastWeekDate, String queryPlatform, String queryChannel, String queryServer) {
		Map<Integer, OverviewDetailData> tmp = new LinkedHashMap<>();
		for (int i = 0; i < 24; i++) {
			OverviewDetailData o = new OverviewDetailData();
			o.setHour(i);
			o.setLookDateStr(Time.getDateStr(lookDate));
			o.setCompareDateStr(Time.getDateStr(compareDate));
			o.setLastWeekDateStr(Time.getDateStr(lastWeekDate));
			tmp.put(i, o);
		}

		newUserByHourManager.updateHourNewUserByConditions(updateType, tmp, lookDate, compareDate, lastWeekDate,
				queryPlatform, queryChannel, queryServer); // 新增账号数
		distinctNewUserByHourManager.updateHourDistinctNewUserByConditions(updateType, tmp, lookDate, compareDate,
				lastWeekDate, queryPlatform, queryChannel, queryServer); // 去重新增账号数
		dauByHourManager.updateHourActiveUserByConditions(updateType, tmp, lookDate, compareDate, lastWeekDate,
				queryPlatform, queryChannel, queryServer); // 活跃账号数
		addCashUserByHourManager.updateHourPayUserByConditions(updateType, tmp, lookDate, compareDate, lastWeekDate,
				queryPlatform, queryChannel, queryServer); // 付费账号数
		cashAddByHourManager.updateHourCashAddByConditions(updateType, tmp, lookDate, compareDate, lastWeekDate,
				queryPlatform, queryChannel, queryServer); // 付费金额
		newUserAddCashUserByHourManager.updateHourNewUserAddCashUserByConditions(updateType, tmp, lookDate,
				compareDate, lastWeekDate, queryPlatform, queryChannel, queryServer); // 新增帐号付费人数
		newUserCashAddByHourManager.updateHourNewUserCashAddByConditions(updateType, tmp, lookDate, compareDate,
				lastWeekDate, queryPlatform, queryChannel, queryServer); // 新增帐号付费金额

        //由于分数次留记录在前一日上面，因此这里选择主动偏移一天，特殊处理由前端负责经降显示日期偏移
        Date lookDate1 = new Date(Time.getBeginningOfDay(lookDate.getTime() - 1 * Time.DAY));
        Date compareDate1 = new Date(Time.getBeginningOfDay(compareDate.getTime() - 1 * Time.DAY));
        Date lastWeekDate1 = new Date(Time.getBeginningOfDay(lastWeekDate.getTime() - 1 * Time.DAY));
        user2LeftByHourManager.updateUser2LeftHourByConditions(updateType, tmp, lookDate1, compareDate1, lastWeekDate1,
				queryPlatform, queryChannel, queryServer);// 分时累计次留
		dauTotalByHourManager.updateTotalHourActiveUserByConditions(updateType, tmp, lookDate, compareDate, lastWeekDate,
                queryPlatform, queryChannel, queryServer);// 分时累计活跃

		List<OverviewDetailData> tmpList = new ArrayList<>(tmp.values());
		Collections.sort(tmpList, new OverviewDetailData().comparatorHour);
		return tmpList;
	}

    // 实时汇总数据
	public class OverviewData {
		private String title; // 标题
		private String value = "-"; // 数值

		public String getTitle() {
			return title;
		}

		public void setTitle(String title) {
			this.title = title;
		}

		public String getValue() {
			return value;
		}

        public String getFormatValue() {
            return value.contains(",") ? value.replaceAll(",", "") : value;
        }

		public void setValue(String value) {
			if (value != null && !"".equals(value)) { // 为空时，不赋值，默认为“-”
                if (Pattern.compile("^[-\\+]?[\\d]*$").matcher(value).matches()) {
                    this.value = PageHelper.formatInt(value);
                } else if (Pattern.compile("^[-\\+]?[.\\d]*$").matcher(value).matches()) {
                    this.value = PageHelper.formatFloat(value);
                } else {
                    this.value = value;
                }
			}
		}
	}

    // 实时对比数据类和chart类
	public class OverviewDetailData {
		@ChartFlow(name = "小时")
		private int hour;

		private String ignoreChartField; // 忽略图表的属性名

		private String lookDateStr = ""; // 查看日时间字符串
		private String compareDateStr = ""; // 对比日时间字符串
		private String lastWeekDateStr = ""; // 上周同期时间字符串

		/*
		 * // 新增设备
		 * 
		 * @ChartSelect(name = "新增设备", key = 1)
		 * 
		 * @ChartData1(name = "查看日新增设备", key = 1) private int
		 * newDeviceLookValue;
		 * 
		 * @ChartData1(name = "对比日新增设备", key = 1) private int
		 * newDeviceCompareValue;
		 */

		// 新增账号数
		@ChartSelect(name = "新增账号数", key = 2)
		@ChartData1(name = "日新增账号数", key = 2, legendPrefix = "lookDateStr")
		private int newUserLookValue = 0;
		@ChartData1(name = "日新增账号数", key = 2, legendPrefix = "compareDateStr")
		private int newUserCompareValue = 0;
		@ChartData1(name = "日（上周同期）新增账号数", key = 2, legendPrefix = "lastWeekDateStr")
		private int newUserLastWeekValue = 0;

		// 去重新增账号数
		@ChartSelect(name = "去重新增账号数", key = 8)
		@ChartData1(name = "日去重新增账号数", key = 8, legendPrefix = "lookDateStr")
		private int distinctNewUserLookValue;
		@ChartData1(name = "日去重新增账号数", key = 8, legendPrefix = "compareDateStr")
		private int distinctNewUserCompareValue;
		@ChartData1(name = "日（上周同期）去重新增账号数", key = 8, legendPrefix = "lastWeekDateStr")
		private int distinctNewUserLastWeekValue;

		// 活跃账号数
		@ChartSelect(name = "活跃账号数", key = 3)
		@ChartData1(name = "日活跃账号数", key = 3, legendPrefix = "lookDateStr")
		private int activeUserLookValue;
		@ChartData1(name = "日活跃账号数", key = 3, legendPrefix = "compareDateStr")
		private int activeUserCompareValue;
		@ChartData1(name = "日（上周同期）活跃账号数", key = 3, legendPrefix = "lastWeekDateStr")
		private int activeUserLastWeekValue;

		// 付费账号数
		@ChartSelect(name = "付费账号数", key = 4)
		@ChartData1(name = "日付费账号数", key = 4, legendPrefix = "lookDateStr")
		private int payUserLookValue;
		@ChartData1(name = "日付费账号数", key = 4, legendPrefix = "compareDateStr")
		private int payUserCompareValue;
		@ChartData1(name = "日（上周同期）付费账号数", key = 4, legendPrefix = "lastWeekDateStr")
		private int payUserLastWeekValue;

		// 付费金额
		@ChartSelect(name = "付费金额", key = 5)
		@ChartData1(name = "日付费金额", key = 5, legendPrefix = "lookDateStr")
		private long payLookValue;
		@ChartData1(name = "日付费金额", key = 5, legendPrefix = "compareDateStr")
		private long payCompareValue;
		@ChartData1(name = "日（上周同期）付费金额", key = 5, legendPrefix = "lastWeekDateStr")
		private long payLastWeekValue;

		// 活跃付费渗透率
		private float activePayRadioLookValue;
		private float activePayRadioCompareValue;
		private float activePayRadioLastWeekValue;

		// 昨日新增帐号次日留存率
		private float newUser2LeftLookValue;
		private float newUser2LeftCompareValue;
		private float newUser2LeftLastWeekValue;

		// 新增设备次日留存率
		// private float newDevice2LeftLookValue;
		// private float newDevice2LeftCompareValue;

		// 新增账号付费人数
		@ChartSelect(name = "新增账号付费人数", key = 6)
		@ChartData1(name = "日新增账号付费人数", key = 6, legendPrefix = "lookDateStr")
		private int newPayUserLookValue;
		@ChartData1(name = "日新增账号付费人数", key = 6, legendPrefix = "compareDateStr")
		private int newPayUserCompareValue;
		@ChartData1(name = "日（上周同期）新增账号付费人数", key = 6, legendPrefix = "lastWeekDateStr")
		private int newPayUserLastWeekValue;

		// 新增账号付费金额
		@ChartSelect(name = "新增账号付费金额", key = 7)
		@ChartData1(name = "日新增账号付费金额", key = 7, legendPrefix = "lookDateStr")
		private int newUserPayLookValue;
		@ChartData1(name = "日新增账号付费金额", key = 7, legendPrefix = "compareDateStr")
		private int newUserPayCompareValue;
		@ChartData1(name = "日（上周同期）新增账号付费金额", key = 7, legendPrefix = "lastWeekDateStr")
		private int newUserPayLastWeekValue;

		// 新增账号分时次留
		@ChartSelect(name = "新增账号分时次留", key = 8)
		@ChartData1(name = "新增账号分时次留", key = 8, legendPrefix = "lookDateStr")
		private double userSecond2LeftHourLookValue = 0.0d;
		@ChartData1(name = "新增账号分时次留", key = 8, legendPrefix = "compareDateStr")
		private double userSecond2LeftHourCompareValue = 0.0d;
		@ChartData1(name = "新增账号分时次留", key = 8, legendPrefix = "lastWeekDateStr")
		private double userSecond2LeftHourLastWeekValue = 0.0d;
		
		// 分时累计活跃账号数
		@ChartSelect(name = "分时累计活跃账号", key = 9)
		@ChartData1(name = "分时累计活跃账号", key = 9, legendPrefix = "lookDateStr")
		private int totalActiveUserLookValue;
		@ChartData1(name = "分时累计活跃账号", key = 9, legendPrefix = "compareDateStr")
		private int totalActiveUserCompareValue;
		@ChartData1(name = "日（上周同期）分时累计活跃账号", key = 9, legendPrefix = "lastWeekDateStr")
		private int totalActiveUserLastWeekValue;

		// 根据小时排序的比较器
		public final Comparator<OverviewDetailData> comparatorHour = new Comparator<OverviewDetailData>() {
			public int compare(OverviewDetailData s1, OverviewDetailData s2) {
				return new Integer(s2.getHour()).compareTo(new Integer(s1.getHour()));
			}
		};

		// 根据小时排序的比较器
		public final Comparator<OverviewDetailData> comparatorHour2 = new Comparator<OverviewDetailData>() {
			public int compare(OverviewDetailData s1, OverviewDetailData s2) {
				return new Integer(s1.getHour()).compareTo(new Integer(s2.getHour()));
			}
		};

		public String getIgnoreChartField() {
			return ignoreChartField;
		}

		public void setIgnoreChartField(String ignoreChartField) {
			this.ignoreChartField = ignoreChartField;
		}

		public int getHour() {
			return hour;
		}

		public void setHour(int hour) {
			this.hour = hour;
		}

		/*
		 * public int getNewDeviceLookValue() { return newDeviceLookValue; }
		 * 
		 * public void setNewDeviceLookValue(int newDeviceLookValue) {
		 * this.newDeviceLookValue = newDeviceLookValue; }
		 * 
		 * public int getNewDeviceCompareValue() { return newDeviceCompareValue;
		 * }
		 * 
		 * public void setNewDeviceCompareValue(int newDeviceCompareValue) {
		 * this.newDeviceCompareValue = newDeviceCompareValue; }
		 */

		public int getNewUserLookValue() {
			return newUserLookValue;
		}

		public void setNewUserLookValue(int newUserLookValue) {
			this.newUserLookValue = newUserLookValue;
		}

		public int getNewUserCompareValue() {
			return newUserCompareValue;
		}

		public void setNewUserCompareValue(int newUserCompareValue) {
			this.newUserCompareValue = newUserCompareValue;
		}

		public int getActiveUserLookValue() {
			return activeUserLookValue;
		}

		public void setActiveUserLookValue(int activeUserLookValue) {
			this.activeUserLookValue = activeUserLookValue;
		}

		public int getActiveUserCompareValue() {
			return activeUserCompareValue;
		}

		public void setActiveUserCompareValue(int activeUserCompareValue) {
			this.activeUserCompareValue = activeUserCompareValue;
		}

		public int getDistinctNewUserLookValue() {
			return distinctNewUserLookValue;
		}

		public void setDistinctNewUserLookValue(int distinctNewUserLookValue) {
			this.distinctNewUserLookValue = distinctNewUserLookValue;
		}

		public int getDistinctNewUserCompareValue() {
			return distinctNewUserCompareValue;
		}

		public void setDistinctNewUserCompareValue(int distinctNewUserCompareValue) {
			this.distinctNewUserCompareValue = distinctNewUserCompareValue;
		}

		public int getDistinctNewUserLastWeekValue() {
			return distinctNewUserLastWeekValue;
		}

		public void setDistinctNewUserLastWeekValue(int distinctNewUserLastWeekValue) {
			this.distinctNewUserLastWeekValue = distinctNewUserLastWeekValue;
		}

		public int getPayUserLookValue() {
			return payUserLookValue;
		}

		public void setPayUserLookValue(int payUserLookValue) {
			this.payUserLookValue = payUserLookValue;
		}

		public int getPayUserCompareValue() {
			return payUserCompareValue;
		}

		public void setPayUserCompareValue(int payUserCompareValue) {
			this.payUserCompareValue = payUserCompareValue;
		}

		public long getPayLookValue() {
			return payLookValue;
		}

		public void setPayLookValue(long payLookValue) {
			this.payLookValue = payLookValue;
		}

		public long getPayCompareValue() {
			return payCompareValue;
		}

		public void setPayCompareValue(long payCompareValue) {
			this.payCompareValue = payCompareValue;
		}

		public float getActivePayRadioLookValue() {
			return activePayRadioLookValue;
		}

		public void setActivePayRadioLookValue(float activePayRadioLookValue) {
			this.activePayRadioLookValue = activePayRadioLookValue;
		}

		public float getActivePayRadioCompareValue() {
			return activePayRadioCompareValue;
		}

		public void setActivePayRadioCompareValue(float activePayRadioCompareValue) {
			this.activePayRadioCompareValue = activePayRadioCompareValue;
		}

		public float getNewUser2LeftLookValue() {
			return newUser2LeftLookValue;
		}

		public void setNewUser2LeftLookValue(float newUser2LeftLookValue) {
			this.newUser2LeftLookValue = newUser2LeftLookValue;
		}

		public float getNewUser2LeftCompareValue() {
			return newUser2LeftCompareValue;
		}

		public void setNewUser2LeftCompareValue(float newUser2LeftCompareValue) {
			this.newUser2LeftCompareValue = newUser2LeftCompareValue;
		}

		/*
		 * public float getNewDevice2LeftLookValue() { return
		 * newDevice2LeftLookValue; }
		 * 
		 * public void setNewDevice2LeftLookValue(float newDevice2LeftLookValue)
		 * { this.newDevice2LeftLookValue = newDevice2LeftLookValue; }
		 * 
		 * public float getNewDevice2LeftCompareValue() { return
		 * newDevice2LeftCompareValue; }
		 * 
		 * public void setNewDevice2LeftCompareValue( float
		 * newDevice2LeftCompareValue) { this.newDevice2LeftCompareValue =
		 * newDevice2LeftCompareValue; }
		 */

		public int getNewPayUserLookValue() {
			return newPayUserLookValue;
		}

		public void setNewPayUserLookValue(int newPayUserLookValue) {
			this.newPayUserLookValue = newPayUserLookValue;
		}

		public int getNewPayUserCompareValue() {
			return newPayUserCompareValue;
		}

		public void setNewPayUserCompareValue(int newPayUserCompareValue) {
			this.newPayUserCompareValue = newPayUserCompareValue;
		}

		public int getNewUserPayLookValue() {
			return newUserPayLookValue;
		}

		public void setNewUserPayLookValue(int newUserPayLookValue) {
			this.newUserPayLookValue = newUserPayLookValue;
		}

		public int getNewUserPayCompareValue() {
			return newUserPayCompareValue;
		}

		public void setNewUserPayCompareValue(int newUserPayCompareValue) {
			this.newUserPayCompareValue = newUserPayCompareValue;
		}

		public String getLookDateStr() {
			return lookDateStr;
		}

		public void setLookDateStr(String lookDateStr) {
			this.lookDateStr = lookDateStr;
		}

		public String getCompareDateStr() {
			return compareDateStr;
		}

		public void setCompareDateStr(String compareDateStr) {
			this.compareDateStr = compareDateStr;
		}

		public String getLastWeekDateStr() {
			return lastWeekDateStr;
		}

		public void setLastWeekDateStr(String lastWeekDateStr) {
			this.lastWeekDateStr = lastWeekDateStr;
		}

		public int getNewUserLastWeekValue() {
			return newUserLastWeekValue;
		}

		public void setNewUserLastWeekValue(int newUserLastWeekValue) {
			this.newUserLastWeekValue = newUserLastWeekValue;
		}

		public int getActiveUserLastWeekValue() {
			return activeUserLastWeekValue;
		}

		public void setActiveUserLastWeekValue(int activeUserLastWeekValue) {
			this.activeUserLastWeekValue = activeUserLastWeekValue;
		}

		public int getPayUserLastWeekValue() {
			return payUserLastWeekValue;
		}

		public void setPayUserLastWeekValue(int payUserLastWeekValue) {
			this.payUserLastWeekValue = payUserLastWeekValue;
		}

		public long getPayLastWeekValue() {
			return payLastWeekValue;
		}

		public void setPayLastWeekValue(long payLastWeekValue) {
			this.payLastWeekValue = payLastWeekValue;
		}

		public float getActivePayRadioLastWeekValue() {
			return activePayRadioLastWeekValue;
		}

		public void setActivePayRadioLastWeekValue(float activePayRadioLastWeekValue) {
			this.activePayRadioLastWeekValue = activePayRadioLastWeekValue;
		}

		public float getNewUser2LeftLastWeekValue() {
			return newUser2LeftLastWeekValue;
		}

		public void setNewUser2LeftLastWeekValue(float newUser2LeftLastWeekValue) {
			this.newUser2LeftLastWeekValue = newUser2LeftLastWeekValue;
		}

		public int getNewPayUserLastWeekValue() {
			return newPayUserLastWeekValue;
		}

		public void setNewPayUserLastWeekValue(int newPayUserLastWeekValue) {
			this.newPayUserLastWeekValue = newPayUserLastWeekValue;
		}

		public int getNewUserPayLastWeekValue() {
			return newUserPayLastWeekValue;
		}

		public void setNewUserPayLastWeekValue(int newUserPayLastWeekValue) {
			this.newUserPayLastWeekValue = newUserPayLastWeekValue;
		}

		public double getUserSecond2LeftHourLookValue() {
			return userSecond2LeftHourLookValue;
		}

		public void setUserSecond2LeftHourLookValue(double userSecond2LeftHourLookValue) {
			this.userSecond2LeftHourLookValue = userSecond2LeftHourLookValue;
		}

		public double getUserSecond2LeftHourCompareValue() {
			return userSecond2LeftHourCompareValue;
		}

		public void setUserSecond2LeftHourCompareValue(double userSecond2LeftHourCompareValue) {
			this.userSecond2LeftHourCompareValue = userSecond2LeftHourCompareValue;
		}

		public double getUserSecond2LeftHourLastWeekValue() {
			return userSecond2LeftHourLastWeekValue;
		}

		public void setUserSecond2LeftHourLastWeekValue(double userSecond2LeftHourLastWeekValue) {
			this.userSecond2LeftHourLastWeekValue = userSecond2LeftHourLastWeekValue;
		}

		public int getTotalActiveUserLookValue() {
			return totalActiveUserLookValue;
		}

		public void setTotalActiveUserLookValue(int totalActiveUserLookValue) {
			this.totalActiveUserLookValue = totalActiveUserLookValue;
		}

		public int getTotalActiveUserCompareValue() {
			return totalActiveUserCompareValue;
		}

		public void setTotalActiveUserCompareValue(int totalActiveUserCompareValue) {
			this.totalActiveUserCompareValue = totalActiveUserCompareValue;
		}

		public int getTotalActiveUserLastWeekValue() {
			return totalActiveUserLastWeekValue;
		}

		public void setTotalActiveUserLastWeekValue(int totalActiveUserLastWeekValue) {
			this.totalActiveUserLastWeekValue = totalActiveUserLastWeekValue;
		}
	}
}
